package com.bruan.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

public class ProxyUtil {
    public static Star creteProxy(BigStar bigStar){
//        ClassLoader loader,
//        Class<?>[] interfaces,
//        InvocationHandler h
        Star starProxy = (Star) Proxy.newProxyInstance(ProxyUtil.class.getClassLoader(), new Class[]{Star.class}, new InvocationHandler() {
            @Override
            public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                //代理要做什么事情
                return null;
            }
        });
    }
}
